﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Main.aspx.cs" Inherits="Vehicle.Web.Pages.Post.Main" %>
<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>

<%@ Register Assembly="GMDatePicker" Namespace="GrayMatterSoft" TagPrefix="cc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title></title>
     <link href="../../Style/skin.css" rel="stylesheet" type="text/css" />
    <script language="javascript" type="text/javascript" src="../../Scripts/Menu.js"></script>
</head>
<body>
<form id="form1" runat="server">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
   <td width="17" valign="top" background="../../Images/mail_leftbg.gif"><img src="../../images/left-top-right.gif" width="17" height="29" /></td>
    <td valign="top" background="../../Images/content-bg.gif"><table width="100%" height="31" border="0" cellpadding="0" cellspacing="0" class="left_topbg" id="table2">
      <tr>
        <td height="31"><div class="titlebt">公告管理</div></td>
      </tr>
    </table></td>
    <td width="16" valign="top" background="../../images/mail_rightbg.gif"><img src="../../images/nav-right-bg.gif" width="16" height="29" /></td>
  </tr>
  <tr>
    <td height="71" valign="middle" background="../../images/mail_leftbg.gif">&nbsp;</td>
    <td valign="top" bgcolor="#F7F8F9"><table width="100%" height="138" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td height="13" valign="top">&nbsp;</td>
      </tr>
      <tr>
        <td valign="top"><table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr>
            <td class="left_txt">当前位置：系统管理--公告管理</td>
          </tr>
          <tr>
            <td height="15"><table width="100%" height="1" border="0" cellpadding="0" cellspacing="0" bgcolor="#CCCCCC">
              <tr>
                <td></td>
              </tr>
            </table></td>
          </tr>
        </table>
          </td>
      </tr>
		 <tr>
          <td height=25>
           <!-- 筛选数据选择项 -->
            <table cellSpacing="0" cellPadding="2" border="0">
              <tbody>
              <tr>
                <td class="left_txt">筛选数据：</td>
                <td class="left_txt">公告标题：</td>
                <td class="left_txt"><asp:TextBox ID="txt_P_Title" runat="server"></asp:TextBox></td>
                <td class="left_txt">添加时间：</td>
                <td class="left_txt">起始日期：</td>
                <td class="left_txt">
                    <cc1:GMDatePicker  ID="Gmdp_Start" runat="server" CalendarTheme="Blue"
                        Font-Size="12px" NoneButtonText="清空" TodayButtonText="今天" 
                        InitialValueMode="Null"  EnableViewState="False" DisplayMode="Label">
                    </cc1:GMDatePicker>
                </td>
                <td class="left_txt">截止日期：</td>
                <td class="left_txt" >
                    <cc1:GMDatePicker ID="Gmdp_End" runat="server" CalendarTheme="Blue"
                        Font-Size="12px" NoneButtonText="清空" TodayButtonText="今天" 
                        InitialValueMode="Null" CalendarWidth="200px" EnableViewState="False" 
                        DisplayMode="Label">
                    </cc1:GMDatePicker>
                </td>
                <td>
                    <asp:Button ID="btn_Select" runat="server" Text="筛选" class="button" 
                        onclick="btn_Select_P_Time_Click" />
                </td></tr></tbody></table></td></tr>
				 <tr>
				 <!-- 定义AJAX控件  -->
          <td><asp:ScriptManager ID="SM_AJAX" runat="server">
                 </asp:ScriptManager>   
				 <asp:UpdatePanel ID="UPanel" runat="server">
				 <ContentTemplate>
				  <!-- 定义Repeater控件用于绑定数据  -->				  
                  <asp:Repeater ID="Rept" runat="server" onitemcommand="Rept_ItemCommand" 
                         onitemdatabound="Rept_ItemDataBound"  >
            <HeaderTemplate>
            <table id="grid" class="Tablt_All"  cellSpacing="1" cellPadding="2" rules="all" border="0">
          <tr class="main_tab">
            <td width="5%">选择</td>
            <td width="10%">公告编号</td>
            <td width="15%">公告标题</td>
            <td width="25%">公告内容</td>
            <td width="15%">添加时间</td>
            <td width="15%">发布人</td>
            <td width="18%">操作</td>
          </tr>
            </HeaderTemplate>
            <ItemTemplate>
            <tr class="TR_All">
            <td ><asp:CheckBox ID="Chk_Num" runat="server"  ToolTip='<%# Eval("P_ID") %>' /></td>
            <td><%# Eval("P_ID") %></td>
            <td><a href='../Post_View.aspx?id=<%# Eval("P_ID") %>'><%#GetSubString(DataBinder.Eval(Container.DataItem,"P_Title").ToString(),10)%></a></td>
            <td><%#GetSubString(DataBinder.Eval(Container.DataItem,"P_Note").ToString(),20)%></td>
              <td ><%# Eval("P_Time", "{0:yyyy-MM-dd}")%></td>
                <td><%# Eval("P_Name")%></td>
            <td><img alt="" src="../../images/pic9.gif" height="13" /><a href="Post_Edit.aspx?id=<%# Eval("P_ID") %>">编辑</a>&nbsp;&nbsp;<img alt="" src="../../images/pic22.gif" height="13" /><asp:LinkButton ID="lbtn_Delete" runat="server"  CommandName="Delete"  CommandArgument='<%# Eval("P_ID")%>'>删除</asp:LinkButton>
                </td>
          </tr>
            </ItemTemplate>
         <FooterTemplate>
          </table>
         </FooterTemplate>
        </asp:Repeater>
               <!-- 注册外部控件调用AJAX控件  -->   
                 <font style="text-align:center; color:Red;"><%= onshow %></font>
              </ContentTemplate> 
               <Triggers>
               <asp:AsyncPostBackTrigger ControlID="btn_Select" />
               <asp:AsyncPostBackTrigger ControlID="Anp_Page" />
               <asp:AsyncPostBackTrigger ControlID="lbtn_AllDelete" />
               </Triggers>
   </asp:UpdatePanel> </td></tr>
    <tr>
          <td align="right" height="25"><img src="../../images/pic21.gif" height="13" /><asp:CheckBox ID="Chk_All" runat="server" onclick="selectall(this.checked)" />
            <font class="left_txt">全选</font>&nbsp;&nbsp;&nbsp;
            <img src="../../images/pic12.gif" height="13" />
            <font class="left_txt">
                <asp:LinkButton ID="lbtn_AllDelete" runat="server" 
                  onclick="lbtn_AllDelete_Click">删除公告</asp:LinkButton></font>&nbsp;&nbsp;&nbsp; 
            <img src="../../images/pic10.gif" height="13" />
            <font class="left_txt"><a href="Post_Add.aspx">新增公告</a></font>&nbsp;&nbsp;&nbsp;
             </td></tr>         
  
             
			 <tr>
			 <td>
			 <asp:UpdatePanel ID="UPanel2" runat="server">
                 <ContentTemplate>
                  <!-- AspNetPager分页控件 -->
                     <webdiyer:AspNetPager ID="Anp_Page" runat="server" CustomInfoHTML="第%CurrentPageIndex%页，共%PageCount%页，每页%PageSize%条"
                    FirstPageText="首页" LastPageText="尾页" NextPageText="下一页" PageIndexBoxType="DropDownList"
                    PrevPageText="上一页" ShowCustomInfoSection="Left" ShowPageIndexBox="Always" SubmitButtonText="Go"
                    TextAfterPageIndexBox="页" TextBeforePageIndexBox="转到" 
                     OnPageChanged="AspNetPager1_PageChanged" PageSize="10" LayoutType="Table" 
                     AlwaysShow="True" ForeColor="#80FFFF" BorderStyle="None" CssClass="left_txt">
                     </webdiyer:AspNetPager>
                 </ContentTemplate>
                 </asp:UpdatePanel></td>       
         </tr>
    </table></td>
    <td background="../../images/mail_rightbg.gif">&nbsp;</td>
  </tr> 
     
  <tr>
    <td valign="middle" background="../../images/mail_leftbg.gif"><img src="../../images/buttom_left2.gif" width="17" height="17" /></td>
      <td height="17" valign="top" background="../../images/buttom_bgs.gif"><img src="../../images/buttom_bgs.gif" width="17" height="17" /></td>
    <td background="../../images/mail_rightbg.gif"><img src="../../images/buttom_right2.gif" width="16" height="17" /></td>
  </tr>
</table>
<asp:UpdateProgress ID="UProgress" runat="server" AssociatedUpdatePanelID="UPanel">
<ProgressTemplate>
<font class="left_txt">数据提交中....</a></font>
</ProgressTemplate>
</asp:UpdateProgress>
</form>

</body>
</html>
